<template>
  <div style="height: 100%;">
    <!--执行计划-->
    <hiddenTroubleplan pageType="1" @hiddenPerils="hiddenPerils"></hiddenTroubleplan>


    <Drawer title="隐患排查" v-model="pageState" width="1100" :mask-closable="false" :draggable="true">
      <hiddenPerils v-if="pageState" :hiddenPerilsData="hiddenPerilsData"></hiddenPerils>
    </Drawer>

<!--    <hiddenPerils v-else :hiddenPerilsData="hiddenPerilsData" @hiddenPlan="pageState = true"></hiddenPerils>-->
  </div>
</template>
<script>
import hiddenTroubleplan from "./hiddenTroubleplan";
import hiddenPerils from "./hiddenPerils";

export default {
  components: {
    hiddenTroubleplan,//添加
    hiddenPerils,//隐患排查
  },
  data() {
    return {
      pageState:false,
      hiddenPerilsData:{},
    }
  },
  computed: {//计算属性

  },
  beforeCreate() {//beforeCreate创建前状态

  },
  created() {//created创建完毕状态

  },
  beforeMount() {//beforeMount挂载前状态   DOM 元素然后塞入页面的过程

  },
  mounted() {//mounted 挂载结束状态

  },
  methods: {//执行的方法
    //跳转隐患排查
    hiddenPerils(data){
      this.hiddenPerilsData = data;
      this.pageState = true;
    },
  },
  watch: {//监听

  },
  props: {//接收来自父组件的数据

  },
  beforeUpdate() {//beforeUpdate 更新前状态

  },
  updated() {//updated 更新完成状态

  },
  beforeDestroy() {//beforeDestroy 销毁前状态

  },
  destroyed() {//destroyed 销毁完成状态

  }
}
</script>
<style lang="less">

</style>
